//强制登录逻辑
function checkLogin() {
    $.ajax({
        type: 'get',
        url: 'login',
        success: function() {
            console.log('已登录~');
        },
        error: function() {
            console.log('未登录~');
            location.assign("login.html");
        }
    });
}